package com.threeox.commonlibrary.entity.engine.event;

import com.threeox.utillibrary.util.res.IdHelper;
import com.threeox.utillibrary.util.res.StringHelper;

/**
 *
 * @ClassName: EventMessage
 *
 * @Description: TODO(组件事件对象)
 *
 * @author 赵屈犇
 *
 * @date 创建时间: 2017/7/4 14:30
 *
 * @version 1.0
 *
 */
public class EventMessage extends BaseEventMessage {

    private Integer id; // 组件的ID属性
    private String tag; // 组件的tag值
    private String idName; // 组件的Id名称
    private String eventType;// 组件的事件类型   EventTypeMsg
    private String clickTag; // 点击标志用于没有id和tag 的view

    public void initData(StringHelper stringHelper, IdHelper idHelper) {
        super.initData(stringHelper);
        this.id = idHelper.getIdByName(this.idName, IdHelper.ResType.id);
        // this.tag = stringHelper.getStringText(tag);
    }

    public int getViewId() {
        return (id != null) ? id : 0;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getIdName() {
        return idName;
    }

    public void setIdName(String idName) {
        this.idName = idName;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getClickTag() {
        return clickTag;
    }

    public void setClickTag(String clickTag) {
        this.clickTag = clickTag;
    }
}
